package model;

public class RecognizedResult implements Result{

	private final String result;

	/**
	 * Constructor of {@link RecognizedResult}.
	 * @param result is the output string.
	 */
	public RecognizedResult(final String result) {
		this.result = result;
	}
	/**
	 * Provides the output string of this {@link Result}.
	 * @return
	 */
	public String getResult() {
		return this.result;
	}

	@Override
	public void accept(final ResultVisitor resultVisitor) {
		resultVisitor.visit(this);
	}
	
	@Override
	public boolean equals(final Object obj) {
		boolean result = false;
		if(obj instanceof RecognizedResult ){
			final RecognizedResult other = (RecognizedResult) obj;
			result = this.result.equals(other.getResult());
		}
		return result;
	}
	
}
